package com.dragee.modules.work.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dragee.config.resolver.LongJsonDeserializer;
import com.dragee.config.resolver.LongJsonSerializer;
import com.dragee.utils.excel.FieldDispose;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;

/**
 * 积分历史
 * 
 * @author tc
 * @email tc@mail.com
 * @date 2023-07-03 17:37:43
 */
@Data
@TableName("t_points_history")
public class PointsHistoryEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @ExcelIgnore
    private Long id;
    /**
     * 用户id
     */
    @ExcelProperty(value = "用户id")
    @FieldDispose(value = "userId")
        private String userId;
    /**
     * 类型
     */
    @ExcelProperty(value = "类型")
    @FieldDispose(value = "type")
        private String type;
    /**
     * 增减
     */
    @ExcelProperty(value = "增减")
    @FieldDispose(value = "addOrReduce")
        private String addOrReduce;
    /**
     * 操作积分
     */
    @ExcelProperty(value = "操作积分")
    @FieldDispose(value = "points")
        private String points;
    /**
     * 关联业务id
     */
    @ExcelProperty(value = "关联业务id")
    @FieldDispose(value = "relationId")
        private String relationId;
    }